package com.wangjiacai.utils.utils;

import java.io.UnsupportedEncodingException;

public class Gb2312Util {

    public static byte[] getBytes(Object content) throws UnsupportedEncodingException {
        return content.toString().getBytes("gb2312");
    }

    public static byte[] getBytes(String content) throws UnsupportedEncodingException {
        return content.getBytes("gb2312");
    }

    public static byte[] getBytes(int content) throws UnsupportedEncodingException {
        return (content+"").getBytes("gb2312");
    }

    public static byte[] getBytes(float content) throws UnsupportedEncodingException {
        return (content+"").getBytes("gb2312");
    }

    public static byte[] getBytes(double content) throws UnsupportedEncodingException {
        return (content+"").getBytes("gb2312");
    }

    public static byte[] getBytesWithComma(Object content) throws UnsupportedEncodingException {
        return (content+",").getBytes("gb2312");
    }

    public static byte[] getBytesWithComma(String content) throws UnsupportedEncodingException {
        return (content+",").getBytes("gb2312");
    }

    public static byte[] getBytesWithComma(int content) throws UnsupportedEncodingException {
        return (content+",").getBytes("gb2312");
    }

    public static byte[] getBytesWithComma(float content) throws UnsupportedEncodingException {
        return (content+",").getBytes("gb2312");
    }

    public static byte[] getBytesWithComma(double content) throws UnsupportedEncodingException {
        return (content+",").getBytes("gb2312");
    }
}
